procedure TJQGMap3Frm.GetAddressOnCallbackEvent(Sender: TObject; AParams: TStringList);
var
  LContent: string;
  MyMarker: TIWCGJQGMap3Misc;
begin
  LContent:= AParams.Values['asResultText'];
  MyMarker:= TIWCGJQGMap3Misc.Create(Self);
  try
    MyMarker.Get.Tag:= 'MYTAG';
    MyMarker.Get.Name.Add('marker');
    IWCGJQGMap3.JQGMapV3Options.InfoWindow.Anchor.Script:= Format('%s.gmap3(%s)',[IWCGJQGMap3.GetIDJQuery,MyMarker.JSon.AsJSon]);
    IWCGJQGMap3.JQGMapV3Options.InfoWindow.Options.Content:= '<div style="white-space: nowrap;">' + LContent + '</div>';
    IWCGJQGMap3.JQGMapV3Options.InfoWindow.ApplyProps;
  finally
    FreeAndNil(MyMarker);
  end;
end;

procedure TJQGMap3Frm.GetAddressMarkerDragEndEvent(Sender: TObject; AParams: TStringList);
var
  newLat: Double;
  newLng: Double;
  myFormatSetting: TFormatSettings;
begin
  myFormatSetting.DecimalSeparator:= '.';
  newLat:= StrToFloat(AParams.Values['markerLat'],myFormatSetting);
  newLng:= StrToFloat(AParams.Values['markerLng'],myFormatSetting);
  IWCGJQGMap3.JQGMapV3Options.AddressService.LatLng.Latitude:= newLat;
  IWCGJQGMap3.JQGMapV3Options.AddressService.LatLng.Longitude:= newLng;
  IWCGJQGMap3.JQGMapV3Options.AddressService.OnCallback.OnEvent:= GetAddressOnCallbackEvent;
  IWCGJQGMap3.JQGMapV3Options.AddressService.ApplyProps;
end;


with IWCGJQGMap3.JQGMapV3Options do
begin
  Map.Options.Center.Latitude:= 40.364625;
  Map.Options.Center.Longitude:= -8.454519;
  Map.Options.Zoom:= 10;

  Marker.Options.Draggable:= True;
  Marker.Options.Position.Latitude:= 40.364625;
  Marker.Options.Position.Longitude:= -8.454519;
  Marker.Tag.Add('MYTAG');
  
  Marker.Events.OnDragEnd.OnEvent:= GetAddressMarkerDragEndEvent;
end;
